package com.tool.tcpimg;

/*
 * JavaXYQ Source Code
 * by kylixs
 * at 2010-5-15
 * please visit http://javaxyq.googlecode.com
 * or mail to kylixs@qq.com
 */

import org.come.bean.ColorScheme;
import org.come.until.AnalysisString;
import org.come.until.FontUntil;

import java.awt.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

/** 下面是修改右侧字体大小
 * @author Administrator
 * @date 2010-5-15 create
 */

/**
 * @author HGC 2019年12月9日 下午3:57:12 类名:UIUtils
 */
public class UIUtils {
    // 人物名字间隔
    public static final int NAMESiZE = 25;
    public static final Color COLOR_CBG1;
    public static final Color COLOR_CBG2;
    public static final Color COLOR_CBG3;
    public static final Color COLOR_CBG4;
    public static final Color COLOR_CBG5;
    public static final Font TEXT_FONT10 = new Font("宋体", Font.PLAIN, 12);
    public static final Font TEXT_FONT11 = new Font("宋体", Font.PLAIN, 15);
    public static  final Font  TEXT_MSGX = new Font("宋体", 0, 14);
    public static final Font TEXT_NAME_FONT15= new Font("宋体", 0, 15);
    public static final Font TEXT_FONT14 = new Font("宋体", 0, 14);
    /**
     * 字段名:TEXT_FONT "宋体", Font.PLAIN, 12<br>
     */
    public static final Font TEXT_FONT = new Font("宋体", Font.PLAIN, 12);
    public static final Font TEXT_FONT33 = new Font("宋体", Font.PLAIN, 14);
    public static final Font TEXT_FONT32 = new Font("宋体", Font.PLAIN, 13);
    public static final Font TEXT_FONT6 = new Font("微软雅体", Font.BOLD, 20);
    public static final Font TEXT_FONT7 = new Font("宋体", Font.PLAIN, 10);
    public static final Font TEXT_MSG17 = new Font("微软雅体", Font.BOLD, 17);
    public static final Font TEXT_MSG16 = new Font("微软雅体", Font.BOLD, 16);
    public static final Font TEXT_FONT221 = new Font("宋体", Font.BOLD, 12);
    public static final Font TEXT_FONT2 = new Font("宋体", Font.PLAIN, 13);
    public static final Font TEXT_FONT1 = new Font("宋体", Font.PLAIN, 14);
    public static final Font TEXT_FONT78 = new Font("宋体", Font.PLAIN, 14);
    public static final Font TEXT_FONT15 = new Font("宋体", Font.PLAIN, 15);
    public static final Font TEXT_FONT1B = new Font("宋体", Font.BOLD, 14);
    public static final Font TEXT_NAME_FONT = new Font("宋体", Font.PLAIN, 16);
    public static final Font TEXT_BOLD_FONT = new Font("宋体", Font.BOLD, 16);
    public static final Font TEXT_FONT22 = new Font("宋体", Font.PLAIN, 18);
    public static final Font TEXT_FONT_17 = new Font("宋体", Font.PLAIN, 17);
    public static final Font TEXT_FONT3 = new Font("宋体", Font.PLAIN, 20);
    public static final Font TEXT_FONT60 = new Font("汉仪小隶书", Font.PLAIN, 14);
    public static final Font TEXT_FONT61 = new Font("楷体", Font.BOLD, 17);
    public static final Font TEXT_FONT62 = new Font("LiSu", Font.BOLD, 18);
    public static final Font TEXT_FONT63 = new Font("楷体", Font.BOLD, 16);
    public static final Font TEXT_FONT64 = new Font("黑体", Font.PLAIN, 14);
    public static final Font TEXT_FONT65 = new Font("LiSu", Font.BOLD, 16);
    //给按钮使用的
    public static final Font TEXT_FONT79 = new Font("仿宋", Font.BOLD, 17);
    //人物包裹按钮
    public static final Font TEXT_FONT82 = new Font("宋体", Font.PLAIN, 12);
    public static final Font TEXT_FONT991 = new Font("宋体", Font.PLAIN, 0);

    public static final Font TEXT_FONT99 = new Font("黑体", Font.PLAIN, 13);
    public static final Font TEXT_FONT80 = new Font("宋楷", Font.PLAIN, 15);
    public static final Font TEXT_FONT81 = new Font("正楷", Font.BOLD, 16);
    public static final Font TEXT_FONT85 = new Font("黑体", Font.PLAIN, 14);
    public static final Font TEXT_FONT86 = new Font("正楷", Font.PLAIN, 16);
    // 天演策技能名称
    public static final Font TEXT_FONT5 = new Font("宋体", 1, 19);
    public static final Font TEXT_HURT1 =  new Font("宋体", Font.PLAIN, 12);
    // 汉仪篆书简
    public static final Font TEXT_FONTZS1 = FontUntil.getHanYiFont(14);
    public static final Font TEXT_FONTZS = FontUntil.getHanYiFont(16);
    public static final Font TEXT_FONTZSRL = FontUntil.getHanYiFont(24);
    // 汉仪篆书繁
    public static final Font TEXT_FONTZSF18 = FontUntil.getHYLSFFont(18);
    public static final Font TEXT_FONTZSF20 = FontUntil.getHYLSFFont(20);
    public static final Font TEXT_FONTZSF24 = FontUntil.getHYLSFFont(24);
    public static final Font TEXT_FONTYH15 = new Font("微软雅黑", Font.BOLD, 15);
    public static final Font TEXT_BOLD13 = new Font("微软雅黑", Font.BOLD, 13);
    public static final Font TEXT_FONTYH20 = new Font("微软雅黑", Font.BOLD, 20);

    public static Font nameFont = new Font("宋体", Font.BOLD, 16);// 名称字体

    public static Font TXT_lianss;

    public static final Font HLW;
    public static final Color[] Hlw;
    public static Font TEXT_shuimo2;
    public static Font TXT_lishud;
    public static Color[] Black;
    public static Font TXT_hyzjt18;
    public static Font TXT_hyzjt16;

    /**
     * 灰土色
     */
    public static Color[] COLOR_HUI;
    //    /** 字段名:TEXT_HYK16 汉仪楷体简 <br> */
//    public static final Font TEXT_HYK16 = FontUntil.getHYKTJFont(16);
//    /** 汉仪小隶书简12号 */
//    public static final Font TEXT_HY12 = FontUntil.getHanYiFont(12);
//    /** 汉仪小隶书简14号 */
//    public static final Font TEXT_HY14 = FontUntil.getHanYiFont(14);
//    /** 汉仪小隶书简16号 */
//    public static final Font TEXT_HY16 = FontUntil.getHanYiFont(16);
//    /** 汉仪小隶书简17号 */
//    public static final Font TEXT_HY17 = FontUntil.getHanYiFont(17);
//    /** 汉仪小隶书简19号 */
//    public static final Font TEXT_HY19 = FontUntil.getHanYiFont(19);
//    /** 汉仪小隶书简24号 */
//    public static final Font TEXT_HY24 = FontUntil.getHanYiFont(24);
//    /** 汉仪小隶书简34号 */
//    public static final Font TEXT_HY34 = FontUntil.getHanYiFont(34);
    public static Font TEXT_HYK16;
    /**
     * 字段名:TEXT_HYK16 汉仪楷体简 <br>
     */
    public static Font TEXT_HYK14;
    /**
     * 字段名:TEXT_HYK16 汉仪楷体简 <br>
     */
    public static Font TEXT_HYK20;
    /**
     * 字段名:TEXT_HYK20 汉仪楷体简 <br>
     */
    public static Font TEXT_HY12;
    /**
     * 汉仪小隶书简12号
     */
    public static Font TEXT_HY14;
    /**
     * 汉仪小隶书简14号
     */
    public static Font TEXT_HY16s;
    /**
     * 汉仪小隶书简16号
     */
    public static Font TEXT_HY16a;
    /**
     * 汉仪小隶书简16号
     */
    public static Font TEXT_HY16b;
    /**
     * 汉仪小隶书简16号
     */
    public static Font TEXT_HY16;
    public static Font HYXLSJ17; /** 汉仪小隶书 */
    /**
     * 汉仪小隶书简16号
     */
    public static Font TEXT_HY166;
    /**
     * 汉仪小隶书简16号
     */
    public static Font TEXT_HY17;
    /**
     * 汉仪小隶书简17号
     */
    public static Font TEXT_HY177;
    /**
     * 汉仪小隶书简17号
     */
    public static Font TEXT_HY19;
    /**
     * 汉仪小隶书简19号
     */
    public static Font TEXT_HY24;
    /**
     * 汉仪小隶书简24号
     */
    public static Font TEXT_HY34;
    /**
     * 汉仪小隶书简34号
     */
    public static Font TEXT_HY99;
    public static Font TEXT_HY88;
    public static Font TEXT_HY8814;
    public static Font TEXT_HY192;
    /**
     * 汉仪小隶书简19号
     */
    public static Font TEXT_HY193;
    public static Font siy; /** 思源宋体中 */
    static{
        Font font=FontUntil.loadFont("resource/font/siy.TTF");
        siy=font.deriveFont(Font.ROMAN_BASELINE , 17);
    }

    /** 汉仪小隶书简19号 */
    static {
        Font font = FontUntil.loadFont("resource/font/HYF2GJM_0.TTF");
        TEXT_HY12 = font.deriveFont(Font.LAYOUT_LEFT_TO_RIGHT + Font.BOLD, 12);
        TEXT_HY14 = font.deriveFont(Font.LAYOUT_LEFT_TO_RIGHT + Font.BOLD, 14);
        TEXT_HY16s = font.deriveFont(Font.LAYOUT_LEFT_TO_RIGHT, 16);
        TEXT_HY16a = font.deriveFont(Font.BOLD, 16);
        TEXT_HY16 = font.deriveFont(Font.BOLD, 18);
        TEXT_HY166 = font.deriveFont(Font.BOLD, 16);
        TEXT_HY17 = font.deriveFont(Font.LAYOUT_LEFT_TO_RIGHT + Font.BOLD, 17);
        TEXT_HY177 = font.deriveFont(Font.LAYOUT_LEFT_TO_RIGHT + Font.BOLD, 15);
        TEXT_HY19 = font.deriveFont(Font.LAYOUT_LEFT_TO_RIGHT + Font.BOLD, 19);
        TEXT_HY24 = font.deriveFont(Font.LAYOUT_LEFT_TO_RIGHT + Font.BOLD, 24);
        TEXT_HY34 = font.deriveFont(Font.LAYOUT_LEFT_TO_RIGHT + Font.BOLD, 34);
        TEXT_HY99 = font.deriveFont(1, 15);
        TEXT_HY192 = font.deriveFont(Font.BOLD, 18);
        TEXT_HY193 = font.deriveFont(Font.BOLD, 20);
        TEXT_HY88 = font.deriveFont(1, 16);
        TEXT_HY8814 = font.deriveFont(1, 14);
        font = FontUntil.loadFont("resource/font/HYC1GJM.TTF");
        TEXT_HYK16 = font.deriveFont(Font.BOLD, 16);
        TEXT_HYK14 = font.deriveFont(Font.PLAIN, 14);
        TEXT_HYK20 = font.deriveFont(Font.BOLD, 20);
        TEXT_HY16b = font.deriveFont(Font.BOLD, 16);
        COLOR_CBG1 = new Color(120, 82, 37);
        COLOR_CBG2 = new Color(83, 47, 7);
        COLOR_CBG3 = new Color(123, 105, 84);
        COLOR_CBG4 = new Color(255, 246, 219);
        COLOR_CBG5 = new Color(249, 240, 215);
    }


    /**
     * 字体:宋体-加粗:0-字体:15号
     */
    public static final Font TEXT_COM_FONT = new Font("宋体", 0, 15);
    /** 7-16-HGC-end */

    // 翅膀品质对应颜色
    /**
     * 把玩品质颜色
     */
    public static final Color COLOR_PLAY = new Color(41, 191, 107);
    /**
     * 贴身品质颜色
     */
    public static final Color COLOR_PERSONAL = new Color(1, 251, 249);
    /**
     * 珍藏品质颜色
     */
    public static final Color COLOR_TREASURE = new Color(239, 238, 12);
    /**
     * 无价品质颜色
     */
    public static final Color COLOR_NONVALENT = new Color(219, 10, 205);
    /**
     * 传世品质颜色
     */
    public static final Color COLOR_CHENS = new Color(243, 94, 1);
    /**
     * 神迹品质颜色
     */
    public static final Color COLOR_SIGN = new Color(251, 0, 1);
    /**
     * 提示文字
     */
    public static final Color COLOR_SIGN1 = new Color(255, 255, 0);

    //    /** 藏宝阁字体颜色 */UIUtils
    public static final Color COLOR_cbg1 = new Color(112, 84, 41);
    /**
     * 藏宝阁灰白字体颜色
     */
    public static final Color COLOR_cbg2 = new Color(255, 253, 226);
    /**
     * 藏宝阁商品字体颜色
     */
    public static final Color COLOR_cbg3 = new Color(83, 47, 7);
    /**
     * 藏宝阁价格字体颜色
     */
    public static final Color COLOR_cbg4 = new Color(127, 91, 47);
    /**
     * 藏宝阁首页搜索字体颜色
     */
    public static final Color COLOR_cbg5 = new Color(255, 240, 198);
    /**
     * 藏宝阁商品时间字体颜色
     */
    public static final Color COLOR_cbg6 = new Color(123, 105, 84);
    /**
     * 藏宝阁公示商品时间字体颜色
     */
    public static final Color COLOR_cbg7 = new Color(36, 135, 179);
    /**
     * 藏宝阁页码字体颜色
     */
    public static final Color COLOR_cbg8 = new Color(151, 108, 66);
    /**
     * 藏宝阁页码字体颜色
     */
    public static final Color COLOR_cbg9 = new Color(182, 150, 80);
    /**
     * 藏宝阁购买界面字体1颜色
     */
    public static final Color COLOR_cbg10 = new Color(154, 118, 60);
    /**
     * 藏宝阁购买界面字体2颜色
     */
    public static final Color COLOR_cbg11 = new Color(112, 79, 41);
    /**
     * 藏宝阁购买界面字体2颜色
     */
    public static final Color COLOR_cbg12 = new Color(195, 57, 47);
    /**
     * 藏宝阁购买界面字体3颜色
     */
    public static final Color COLOR_cbg13 = new Color(135, 117, 94);


    /**
     * 心猿界面字体1颜色
     */
    public static final Color COLOR_xy1 = new Color(162, 164, 88);

    /**
     * 冲级礼包界面字体1颜色
     */
    public static final Color COLOR_cbjb1 = new Color(88, 4, 4);


    /**
     * 说明字体颜色
     */
    public static final Color COLOR_sm1 = new Color(255, 255, 255);
    /**
     * 说明字体颜色
     */
    public static final Color COLOR_sm2 = new Color(0, 255, 0);
    /**
     * 说明字体颜色
     */
    public static final Color COLOR_sm3 = new Color(255, 255, 0);
    /**
     * 说明字体颜色
     */
    public static final Color COLOR_sm4 = new Color(0, 255, 255);
    /**
     * 说明字体颜色
     */
    public static final Color COLOR_sm5 = new Color(128, 128, 128);
    /**
     * 说明字体颜色
     */
    public static final Color COLOR_sm6 = new Color(255, 0, 0);


    /**
     * 按钮字体颜色1
     */
    public static final Color COLOR_TEXT1 = new Color(187, 165, 75);
    /**
     * 字段名:COLOR_BTNPUTONG1 <br>
     * 普通按钮
     */
    public static Color[] COLOR_BTNPUTONG;
    public static Color[] COLOR_BTNPUTONG1;
    public static Color[] COLOR_BTNPUTONG2;
    public static Color[] COLOR_RED_BTNTEXT;
    /**
     * 黄色按钮
     */
    public static Color[] COLOR_YELLOW;
    /**
     * 黄色按钮
     */
    public static Color[] COLOR_YELLOW1;
    /**
     * 黑
     */
    public static Color[] COLOR_BLACK;
    /**
     * 白
     */
    public static Color[] COLOR_WHITE;
    /**
     * 灰白
     */
    public static Color[] COLOR_WHITE1;
    /**
     * 黄白
     */
    public static Color[] COLOR_WHITE3;

    /**
     * 黑绿按键
     */
    public static Color[] COLOR_WHITE2;
    /**
     * 字段名:COLOR_BTNTEXT <br>
     * 文字按钮/选项卡按钮
     */
    public static Color[] COLOR_BTNTEXT;
    /**
     * 字段名:COLOR_BTNXUANXIANGKA <br>
     * 选项卡按钮
     */
    public static Color[] COLOR_BTNXUANXIANGKA;

    public static Color[] danxin;

    public static Color[] White;

    /**
     * 首杀队伍颜色
     */
    public static final Color COLOR_FIRSTTEAM = new Color(176, 180, 48);

    public static final Font TEXT_HURT2 = new Font("宋体", Font.BOLD, 14);// 战斗伤害字体


    public static final Font TEXT_FONT42 = new Font("楷体", Font.PLAIN, 18);
    public static final Font TEXT_FONTSC = new Font("楷体", Font.PLAIN + Font.BOLD, 18);

    public static final Font TEXT_FONT21 = new Font("楷体", Font.BOLD + Font.ITALIC, 17);

    public static final Font TEXT_FONT41 = new Font("微软雅体", Font.PLAIN, 20);
    public static final Font TEXT_MSG = new Font("微软雅体", Font.PLAIN, 14);

    public static final Font TEXT_FONT4 = new Font("微软雅体", Font.BOLD, 50);

    public static final Color COLOR_HIHT = new Color(8, 4, 8);
    public static final Color COLOR_NAME_BACKGROUND = new Color(27, 26, 18);
    public static final Color Color_BACK = new Color(0, 0, 0, 0);// 透明
    public static final Font TEXT_TIP = new Font("微软雅黑", 1, 15);
    public static final Font TEXT_TIP1 = new Font("微软雅黑", 1, 13);
    public static final Font TEXT_RESULT = new Font("微软雅黑", Font.LAYOUT_LEFT_TO_RIGHT + Font.BOLD, 20);
    public static final Color COLOR_HURTR1 = new Color(255, 0, 0);
    public static final Color COLOR_HURTR11 = new Color(202, 4, 246);// TODO NPC称谓名字变色
    public static final Color COLOR_HURTB1 = new Color(13, 116, 186);
    public static final Color COLOR_HURTB2 = new Color(0, 18, 31);
    public static final Color COLOR_HURTY1 = new Color(250, 245, 90);
    // NPC暗
    public static final Color COLOR_NPC0 = new Color(196, 199, 69);
    // NPC亮
    public static final Color COLOR_NPC1 = new Color(255, 255, 0);
    // NPC亮
    public static final Color COLOR_Y2 = Color.GREEN;
    // NPC悬停
    public static final Color COLOR_NPC_SELECT = Color.RED;


    // 0转
    public static final Color COLOR_NAME = new Color(100, 200, 0);
    // 1转
    public static final Color COLOR_NAME1 = new Color(255, 110, 0);
    // 2转
    public static final Color COLOR_NAME2 = new Color(62, 223, 236);
    // 3转
    public static final Color COLOR_NAME3 = new Color(255, 0, 0);
    // 飞升
    public static final Color COLOR_NAME4 = new Color(138, 43, 226);

    // 0转暗
    public static final Color COLOR_NAME5 = new Color(60, 110, 0);
    // 1转暗
    public static final Color COLOR_NAME6 = new Color(111, 67, 21);
    // 2转暗
    public static final Color COLOR_NAME7 = new Color(15, 70, 75);
    // 3转暗
    public static final Color COLOR_NAME8 = new Color(100, 0, 0);// 黑
    // 飞升暗
    public static final Color COLOR_NAME9 = new Color(85, 26, 139);

    // 人物称谓
    public static final Color COLOR_NAME10 = new Color(135, 180, 235);// 黑
    // 人物称谓底
    public static final Color COLOR_NAME11 = new Color(60, 100, 150);// 黑
    // NPC名字
    public static final Color COLOR_NAME12 = new Color(255, 255, 0);// 黑
    // NPC名字底
    public static final Color COLOR_NAME13 = new Color(100, 100, 0);// 黑
    // NPC称谓
    public static final Color COLOR_NAME14 = new Color(135, 180, 235);// 黑
    // NPC称谓底
    public static final Color COLOR_NAME15 = new Color(30, 70, 120);// 黑


    // 黑
    public static final Color COLOR_NAME16 = new Color(0, 0, 0);// 黑


    // pet
    // 0转战斗界面宠物名字
    public static final Color COLOR_NAME_PET = new Color(0, 255, 0);
    // 1转战斗界面宠物名字
    public static final Color COLOR_NAME1_PET = new Color(255, 140, 0);
    // 2转战斗界面宠物名字
    public static final Color COLOR_NAME2_PET = new Color(0, 245, 255);
    // 3转战斗界面宠物名字
    public static final Color COLOR_NAME3_PET = new Color(238, 44, 44);
    // 飞升战斗界面宠物名字
    public static final Color COLOR_NAME4_PET = new Color(138, 43, 226);


    // 0转战斗界面宠物名字暗
    public static final Color COLOR_NAME_PET2 = new Color(0, 160, 0);
    // 1转战斗界面宠物名字暗
    public static final Color COLOR_NAME1_PET2 = new Color(180, 70, 0);
    // 2转战斗界面宠物名字暗
    public static final Color COLOR_NAME2_PET2 = new Color(0, 170, 180);
    // 3转战斗界面宠物名字暗
    public static final Color COLOR_NAME3_PET2 = new Color(160, 4, 4);
    // 飞升战斗界面宠物名字暗
    public static final Color COLOR_NAME4_PET2 = new Color(90, 0, 176);


    // 称谓一
    public static final Color COLOR_title = new Color(92, 138, 183);
    // 称谓二
    public static final Color COLOR_title2 = new Color(135, 180, 235);

    public static final Color COLOR_HURTB3 = new Color(255, 255, 255);//纯白色;

    public static final Color COLOR_HURTB4 = new Color(254, 179, 0);//比斗奖章;

    public static final Color COLOR_HURTB5 = new Color(200, 5, 5);//勇者积分;
    /**
     * 字段名:COLOR_FightingRound 战斗回合<br>
     *
     * @time 2019年12月28日 上午10:08:16<br>
     */
    public static final Color COLOR_FightingRound = new Color(199, 252, 0);
    public static final Color COLOR_FightingRound_Black = new Color(0, 0, 0, 179);
    public static final Font TEXT_FONT9 = new Font("宋体", Font.BOLD, 12);
    // 神兵编号
    public static final Color COLOR_SBCode = new Color(250, 250, 198);
    //黄色
    public static final Color COLOR_YCode = new Color(255, 241, 17);
    //红色
    public static final Color COLOR_RCode = new Color(255, 31, 31);
    //紫兰
    public static final Color COLOR_BCode = new Color(99, 31, 255);
    //姨妈红
    public static final Color COLOR_YMRCode = new Color(170, 2, 2);

    // 翅膀字体颜色
    public static final Color COLOR_Wing1 = new Color(187, 165, 75);
    public static final Color COLOR_Draw1 = new Color(210, 222, 122);
    public static final Color COLOR_TBule = new Color(87, 250, 255);
    public static final Color COLOR_Pack = new Color(36, 31, 0);//装备底图
    public static Font TXT_hyxk16;
    static {
        COLOR_RED_BTNTEXT = new Color[3];
        COLOR_RED_BTNTEXT[0] = new Color(16, 24, 2);
        COLOR_RED_BTNTEXT[2] = COLOR_RED_BTNTEXT[1] = new Color(48, 88, 56);

        COLOR_BTNTEXT = new Color[3];
        COLOR_BTNTEXT[0] = COLOR_BTNTEXT[2] = COLOR_BTNTEXT[1] = new Color(255, 255, 255);

        COLOR_RED_BTNTEXT = new Color[3];
        COLOR_RED_BTNTEXT[0] = new Color(187, 165, 75);
        COLOR_RED_BTNTEXT[1] = COLOR_RED_BTNTEXT[2] = new Color(219, 229, 107);


        COLOR_BTNPUTONG = new Color[3];
        COLOR_BTNPUTONG[0] = new Color(16, 24, 2);
        COLOR_BTNPUTONG[2] = COLOR_BTNPUTONG[1] = new Color(48, 88, 56);


        COLOR_BTNPUTONG2 = new Color[3];
        COLOR_BTNPUTONG2[0] = new Color(187, 165, 75);
        COLOR_BTNPUTONG2[2] = COLOR_BTNPUTONG2[1] = new Color(219, 229, 107);

        COLOR_BTNPUTONG1 = new Color[3];
        COLOR_BTNPUTONG1[0] = new Color(184, 153, 83);
        COLOR_BTNPUTONG1[1] = new Color(203, 180, 126);
        COLOR_BTNPUTONG1[2] = new Color(123, 104, 59);

        COLOR_BTNTEXT = new Color[3];
        COLOR_BTNTEXT[0] = COLOR_BTNTEXT[2] = COLOR_BTNTEXT[1] = new Color(255, 255, 255);

        COLOR_BTNXUANXIANGKA = new Color[3];
        COLOR_BTNXUANXIANGKA[0] = new Color(23, 18, 22);
        COLOR_BTNXUANXIANGKA[2] = COLOR_BTNXUANXIANGKA[1] = new Color(40, 68, 40);

        COLOR_YELLOW = new Color[3];
        COLOR_YELLOW[0] = COLOR_YELLOW[1] = COLOR_YELLOW[2] = Color.YELLOW;

        COLOR_YELLOW1 = new Color[3];
        COLOR_YELLOW1[0] = COLOR_YELLOW1[1] = COLOR_YELLOW1[2] = new Color(182, 150, 80);

        COLOR_BLACK = new Color[3];
        COLOR_BLACK[0] = COLOR_BLACK[1] = COLOR_BLACK[2] = Color.BLACK;

        COLOR_WHITE = new Color[3];
        COLOR_WHITE[0] = COLOR_WHITE[1] = COLOR_WHITE[2] = Color.white;

        COLOR_WHITE1 = new Color[3];
        COLOR_WHITE1[0] = COLOR_WHITE1[1] = COLOR_WHITE1[2] = new Color(236, 236, 236);

        COLOR_WHITE3 = new Color[3];
        COLOR_WHITE3[0] = COLOR_WHITE3[1] = COLOR_WHITE3[2] = new Color(150, 129, 59);


        COLOR_WHITE2 = new Color[3];
        COLOR_WHITE2[0] = new Color(16, 24, 24);
        COLOR_WHITE2[1] = new Color(48, 88, 56);
        COLOR_WHITE2[2] = new Color(16, 24, 24);

        (danxin = new Color[3])[0] = new Color(222, 181, 165);
        danxin[2] = (danxin[1] = new Color(245, 230, 184));

        (White = new Color[3])[0] = new Color(255, 255, 255);
        White[2] = (White[1] = new Color(255, 255, 255));


        Font font = FontUntil.loadFont("resource/font/FZ26.TTF");
        TEXT_shuimo2 = font.deriveFont(0, 17.0f);
        font = FontUntil.loadFont("resource/font/HYC1GJM.ttf");
        final Font font2 = FontUntil.loadFont("resource/font/simli.ttf");
        TXT_lishud = font.deriveFont(0, 16.0f);
        TXT_lianss = font2.deriveFont(0, 13.0f);


    }

    /**
     * 根据转生系数获取颜色
     */
    public static Color getcolor(int zs) {
        switch (zs) {
            case -1:
                return Color.gray;
            case 0:
                return COLOR_NAME;
            case 1:
                return COLOR_NAME1;
            case 2:
                return COLOR_NAME2;
            case 3:
                return COLOR_NAME3;
            case 4:
                return COLOR_NAME4;
        }
        return COLOR_NAME;

    }

    /**
     * 根据转生系数获取暗颜色
     */
    public static Color getDarkColor(int zs) {
        switch (zs) {
            case 0:
                return COLOR_NAME5;
            case 1:
                return COLOR_NAME6;
            case 2:
                return COLOR_NAME7;
            case 3:
                return COLOR_NAME8;
            case 4:
                return COLOR_NAME9;
        }
        return COLOR_NAME;

    }

    /**
     * 根据转生系数获取召唤兽颜色
     */
    public static Color getPetcolor(int zs) {
        switch (zs) {
            case -1:
                return Color.gray;
            case 0:
                return COLOR_NAME_PET;
            case 1:
                return COLOR_NAME1_PET;
            case 2:
                return COLOR_NAME2_PET;
            case 3:
                return COLOR_NAME3_PET;
            case 4:
                return COLOR_NAME4_PET;
        }
        return COLOR_NAME;

    }

    /**
     * 根据转生系数获取召唤兽颜色底
     */
    public static Color getPetcolorD(int zs) {
        switch (zs) {
            case -1:
                return Color.gray;
            case 0:
                return COLOR_NAME_PET2;
            case 1:
                return COLOR_NAME1_PET2;
            case 2:
                return COLOR_NAME2_PET2;
            case 3:
                return COLOR_NAME3_PET2;
            case 4:
                return COLOR_NAME4_PET2;
        }
        return COLOR_NAME;

    }

    public static final Color TEXT_NAME_NPC_COLOR = new Color(255, 255, 0);
    public static final Color COLOR_NAME_HIGHLIGHT = Color.RED;
    public static final Font TEXT_FONT111 = new Font("宋体", Font.BOLD, 17);//星盘选择按钮字体大小


    private static Map<String, Color> colors = new HashMap<String, Color>();
    public static Color[] COLOR_RED_zidingyi;


    /**
     * @param color
     * @return
     */
    public static Color getColor(String color) {
        Color c = colors.get(color);
        if (c == null) {
            c = Color.decode("0x" + color.substring(2));
            colors.put(color, c);
        }
        return c;
    }

    /**
     * 依据等级获取颜色
     */
    public static Color gradeForColor(int grade) {
        Color returnColor;
        // 依据等级获取转生系数
        String gradeMes = AnalysisString.lvl(grade);
        // 依据转进行切割
        String intMes[] = gradeMes.split("转");
        if (intMes.length > 1) {
            returnColor = getcolor(Integer.valueOf(intMes[0]));
        } else {
            returnColor = getcolor(4);
        }
        return returnColor;
    }
    static {
        final Font font3 = FontUntil.loadFont("resource/font/huawenxingkai.ttf");
        HLW= font3.deriveFont( 20f);
        Hlw=new Color[3];
        ( Black= new Color[3])[0] = new Color(0, 0, 0);
        Black[2] = (Black[1] = new Color(0, 0, 0));
    }
    public static ArrayList<ColorScheme> getColorScheme(){
        ArrayList<ColorScheme> data = new ArrayList<>();
        ColorScheme colorScheme = new ColorScheme();
        colorScheme.setId(1);
        colorScheme.setName("粉色");
        colorScheme.setValue("1|0|256|512|512|512|0|265|0|0|0|512");
        data.add(colorScheme);
        colorScheme = new ColorScheme();
        colorScheme.setId(2);
        colorScheme.setName("红色");
        colorScheme.setValue("1|0|256|0|100|212|0|50|0|0|0|0");
        data.add(colorScheme);
        colorScheme = new ColorScheme();
        colorScheme.setId(3);
        colorScheme.setName("黄色");
        colorScheme.setValue("1|0|256|512|512|512|0|360|0|0|0|0");
        data.add(colorScheme);
        colorScheme = new ColorScheme();
        colorScheme.setId(4);
        colorScheme.setName("金色");
        colorScheme.setValue("1|0|256|0|380|0|0|380|0|0|0|230");
        data.add(colorScheme);
        colorScheme = new ColorScheme();
        colorScheme.setId(5);
        colorScheme.setName("墨绿");
        colorScheme.setValue("1|0|256|0|0|0|0|124|0|0|0|0");
        data.add(colorScheme);
        colorScheme = new ColorScheme();
        colorScheme.setId(6);
        colorScheme.setName("银色");
        colorScheme.setValue("1|0|256|0|247|0|0|459|0|0|309|0");
        data.add(colorScheme);
        colorScheme = new ColorScheme();
        colorScheme.setId(7);
        colorScheme.setName("蓝色");
        colorScheme.setValue("1|0|256|35|0|0|141|0|512|512|0|0");
        data.add(colorScheme);
//    	colorScheme.setId(8);
//    	colorScheme.setName("紫色");
//    	colorScheme.setValue("1|0|256|0|265|0|0|256|0|0|512|0");
//    	data.add(colorScheme);
        colorScheme = new ColorScheme();
        colorScheme.setId(8);
        colorScheme.setName("原色");
        colorScheme.setValue("");
        data.add(colorScheme);
        return data;
    }
}
